<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/2/28
 * Time: 15:12
 */

namespace Model;


class User
{
    public function signUp($db, $params) {
        $db->insert("user", [
            "username" => $params['username'],
            "password_hash" => $params['password_hash'],
            "email" => $params['email'],
            "nickname" => $params['nickname'],
            "city_id" => $params['city'],
            "created_at" => time(),
            "updated_at" => time(),
        ]);

        return true;
    }
}